"""
The mail fetcher, a stub currently
"""

import hall
import sys, mesgparser
import email.FeedParser

fp = open('mail/test1.mail')
mesg1 = mesgparser.parseMessage(fp.read())
fp.close()

fp = open('mail/test4.mail')
mesg2 = mesgparser.parseMessage(fp.read())
fp.close()

fp = open('mail/test5.mail')
mesg3 = mesgparser.parseMessage(fp.read())
fp.close()

for i in range(0, 5):
    hall.contentMan.addMessage(mesg1)
    hall.contentMan.addMessage(mesg2)
    hall.contentMan.addMessage(mesg3)    

# while (True):
#     sys.stdout.write ('Import mail: ')
#     s = sys.stdin.readline()
#     if (not s): break
#     s = s.strip()
#     if (not s): continue

#     fp = open(s)
#     mesg = mesgparser.parseMessage(fp.read())
#     fp.close()

#     # Push it to server
#     print hall.contentMan.addMessage (mesg)
    
    
